package com.nkbh.sevenday.myhttp.http;


import java.util.Map;

/**
 * Created by pixel on 2018/4/3.
 */

public class HttpManager {

    /**
     * get异步请求
     * @param url
     * @param callBack
     */
    public void get(String url, CallBackResponse callBack){
        OkHttp okHttp = OkHttp.getInstance();
        okHttp.get(url,callBack);
    }

    /**
     * post请求
     * @param url
     * @param map
     * @param callBack
     */
    public void post(String url, Map<String,String> map, CallBackResponse callBack){
        OkHttp.getInstance().post(url,map,callBack);
    }

    public void post(String url, String name, String pwd, final CallBackResponse callBack) {
        OkHttp.getInstance().post(url,name,pwd,callBack);
    }

    public void postUpload(String url, String filePath, String name, String fileType, CallBackResponse callBack){
        OkHttp.getInstance().postUpload(url, filePath, name, fileType, callBack);
    }
}
